import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router)

export default new Router({
  mode:"history",
  routes: [
   
    {
      path: '/favorite',
      name: 'favorite',
      meta:{
        title:"自选"
      },
      component:resolve => require(['../components/favorite.vue'], resolve),
    },
    {
      path: '/search',
      name: 'search',
      meta:{
        title:"币搜索"
      },
      component:resolve => require(['../components/search.vue'], resolve),
    },
    {
      path: '/ticker',
      name: 'ticker',
      meta:{
        title:"全部行情"
      },
      component:resolve => require(['../components/ticker.vue'], resolve),
    },
    {
      path: '/exchangelist',
      name: 'exchangelist',
      meta:{
        title:"交易所"
      },
      component:resolve => require(['../components/exchangelist.vue'], resolve),
    },
    {
      path: '/currencystats',
      name: 'currencystats',
      meta:{
        title:"币热度"
      },
      component:resolve => require(['../components/currencystats.vue'], resolve),
    },
    {
      path: '/exchangestats',
      name: 'exchangestats',
      meta:{
        title:"交易所热度"
      },
      component:resolve => require(['../components/exchangestats.vue'], resolve),
    },
    {
      path: '*',
     redirect: 'exchangelist',
      component:resolve => require(['../components/exchangelist.vue'], resolve),
    },
 
  ]
})
